

(function(){
	G.load_xml_doc = function(dname) {
		var xmlDoc = null;
		try {
			xmlDoc = new ActiveXObject("Microsoft.XMLDOM");
			xmlDoc.async = false;
			xmlDoc.load(dname);
		} catch(e) {
			try {
				xmlDoc = document.implementation.createDocument("", "", null);
				xmlDoc.async = false;
				xmlDoc.load(dname);
			} catch(e) {
				try {
					xmlDoc = new window.XMLHttpRequest();
					xmlDoc.open("GET", dname, false);
					xmlDoc.send(null);

					var dp = new DOMParser();
					xmlDoc = dp.parseFromString(xmlDoc.responseText);
					//xmlDoc = xmlDoc.responseXML.documentElement;
				} catch (e) {
					alert(e.message);
					return null;
				}
			}
		}
		return xmlDoc;
	}
 })();

